﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Edit.aspx.cs" Inherits="Enterprise.UI.Web.Modules.Meeting.Edit" ValidateRequest="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" type="text/css" href="../../Styles/css/ssec-form.css" />
    <script charset="utf-8" src="../../kindeditor-4.1.1/kindeditor.js" type="text/javascript"></script>
    <script charset="utf-8" src="../../kindeditor-4.1.1/lang/zh_CN.js" type="text/javascript"></script>
    <script type="text/javascript">
        var editorcn;
        var editorru
        KindEditor.ready(function (K) {
            editorcn = K.create('#t_Content', { uploadJson: '/kindeditor-4.1.1/upload/upload_json.ashx' });
            editorru = K.create('#t_ContentRu');
        });
        function openlist() {
            $('#rcv_users').window('open');
        }
        function closelist() {
            //关闭窗口
            $('#rcv_users').window('close');
            //获取所有选中的节点的子节点
            var node = $('#tt2').tree('getChecked');
            if (node) {
                var children = $('#tt2').tree('getChecked', node.target);
            } else {
                var children = $('#tt2').tree('getChecked');
            }
            var s = '';
            var c = 0;
            for (var i = 0; i < children.length; i++) {
                var v = children[i].id.toString();
                if (v.indexOf("d-") < 0) {
                    s += children[i].id + ',';
                    c++;
                }
            }
            $('#rcvuser_count').text(c);
            $('#rcv_users_value').attr('value', s);
            //开发时请注释alert
            //alert('选中的人员id:'+s);
        }
        $(function () {
            //初始化签收人个数
            var u = $('#rcv_users_value').val();
            if (u) {
                $('#rcvuser_count').text(u.split(',').length);
            }
            else
                $('#rcvuser_count').text(0);
            jQuery.ajaxSetup({ cache: false })
            $('#tt2').tree({
                lines: true,
                checkbox: true,
                url: '/Modules/Json/UserList.aspx?selected=' + $('#rcv_users_value').val(),
                onClick: function (node) {
                    $(this).tree('toggle', node.target);
                    //alert('you click '+node.text);
                },
                onContextMenu: function (e, node) {
                    e.preventDefault();
                    $('#tt2').tree('select', node.target);
                    $('#mm').menu('show', {
                        left: e.pageX,
                        top: e.pageY
                    });
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainPH" runat="server">
    <div class="vDaohangtiaoHolder module">
        <div class="vDaohangtiao">
            <ul>
                <li class="first">
                    <a href="/index.aspx" title="首页">首页</a>
                </li>
                <li class="last">会议管理
                </li>
            </ul>
        </div>
    </div>
    <Ent:HeadMenuWeb ID="HeadMenu1" runat="server">
    </Ent:HeadMenuWeb>
    <div id="contents" class="ssec-form">
        <div class="ssec-group ssec-group-hasicon">
            <img src="../../easyui1.2.6/themes/icons/application.png" alt="" /><span>会议信息</span>
        </div>
        <ul>
            <li>
                <div class="ssec-label">
                    部门：
                </div>
            </li>
            <li>
                <asp:Label ID="lb_Dept" runat="server"></asp:Label>
            </li>
            <li style="width: 30px;"></li>
            <li>
                <div class="ssec-label">
                    发起人：
                </div>
            </li>
            <li>
                <asp:Label ID="lb_User" runat="server"></asp:Label>
            </li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    会议地点：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text normal">
                    <asp:TextBox ID="t_Address" runat="server" CssClass="ssec-text-field  easyui-validatebox" required="true"></asp:TextBox>
                </div>
            </li>
            <li style="width: 30px;"></li>
            <li>
                <div class="ssec-label">
                    会议时间：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text">
                    <asp:TextBox ID="t_Time" runat="server" CssClass="ssec-text-field  easyui-validatebox easyui-datetimebox"
                        fit="true" Columns="120" required="true"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    主持人：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text normal">
                    <asp:TextBox ID="t_Zcr" runat="server" CssClass="ssec-text-field  easyui-validatebox" required="true"></asp:TextBox>
                </div>
            </li>
            <li style="width: 30px;"></li>
            <li>
                <div class="ssec-label">
                    通知时间：
                </div>
            </li>
            <li>
                <asp:Label ID="t_CreateTime" runat="server"></asp:Label>
            </li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    会议议题(中文)：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text large">
                    <asp:TextBox ID="t_Title" runat="server" CssClass="ssec-text-field  easyui-validatebox" required="true"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    会议议题(俄文)：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text large">
                    <asp:TextBox ID="t_Title_Ru" runat="server" CssClass="ssec-text-field  easyui-validatebox" required="true"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    会议内容(中文)：
                </div>
            </li>
            <li style="width: 100%;">
                <asp:TextBox ID="t_Content" ClientIDMode="Static" TextMode="MultiLine" runat="server"
                    CssClass="easyui-validatebox" Width="99%"></asp:TextBox></li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    会议内容(俄文)：
                </div>
            </li>
            <li style="width: 100%;">
                <asp:TextBox ID="t_ContentRu" ClientIDMode="Static" TextMode="MultiLine" runat="server"
                    CssClass="easyui-validatebox" Width="99%"></asp:TextBox></li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    选择与会人员：
                </div>
            </li>
            <li>
                <asp:HiddenField ID="rcv_users_value" runat="server" ClientIDMode="Static" />
                <%--签收列表--%>
                <a href="#" onclick="openlist();">选择</a> | 已选择<span id="rcvuser_count"></span> 位签收人
            </li>
        </ul>
        <div class="ssec-group-bottom ssec-group-hasicon">
            <asp:LinkButton ID="BtnSave" runat="server" OnClientClick="editorcn.sync();editorru.sync();return $('#form1').form('validate')&&confirm('确认提交吗？');"
                CssClass="easyui-linkbutton" OnClick="BtnSave_OnClick">保存</asp:LinkButton>
        </div>
        <div style="padding: 2px;" class="ssec-form-button">
        </div>
    </div>
    <div id="rcv_users" class="easyui-window" closed="true" modal="true" title="人员列表"
        style="width: 180px; height: 350px;">
        <ul id="tt2"></ul>
        <a href="#" onclick="closelist();" class="easyui-linkbutton">确定</a>
    </div>
</asp:Content>
